package com.sc.study.sleeproom.mapper;

import java.util.List;
import com.sc.study.sleeproom.domain.ScSleepRoomPerson;
import org.apache.ibatis.annotations.Param;

/**
 * 寝室人员Mapper接口
 * 
 * @author sc
 * @date 2022-03-14
 */
public interface ScSleepRoomPersonMapper 
{
    /**
     * 查询寝室人员
     * 
     * @param id 寝室人员主键
     * @return 寝室人员
     */
    public ScSleepRoomPerson selectScSleepRoomPersonById(Long id);

    /**
     * 查询寝室人员列表
     * 
     * @param scSleepRoomPerson 寝室人员
     * @return 寝室人员集合
     */
    public List<ScSleepRoomPerson> selectScSleepRoomPersonList(ScSleepRoomPerson scSleepRoomPerson);

    /**
     * 新增寝室人员
     * 
     * @param scSleepRoomPerson 寝室人员
     * @return 结果
     */
    public int insertScSleepRoomPerson(ScSleepRoomPerson scSleepRoomPerson);

    /**
     * 修改寝室人员
     * 
     * @param scSleepRoomPerson 寝室人员
     * @return 结果
     */
    public int updateScSleepRoomPerson(ScSleepRoomPerson scSleepRoomPerson);

    /**
     * 删除寝室人员
     * 
     * @param id 寝室人员主键
     * @return 结果
     */
    public int deleteScSleepRoomPersonById(Long id);

    /**
     * 批量删除寝室人员
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteScSleepRoomPersonByIds(Long[] ids);

    /**
     * 获取绑定人员id的数量，有则只有一个， 没有则无
     * @param personId 人员id
     * @param personTypeIdList 寝室人员类型集合
     * @return
     */
    Integer getBindPersonIdSize(@Param("personId") Long personId,@Param("personTypeIdList") List<Long> personTypeIdList);
}
